package com.wish.contract.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wish.contract.entity.TbHouseInfo;
import com.wish.contract.entity.vo.HouseInfoVO;
import com.wish.contract.mapper.TbHouseInfoMapper;
import com.wish.contract.service.ITbHouseInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 房源表 曹佳林 王泓翔 服务实现类
 * </p>
 *
 * @author cjl
 * @since 2022-03-26
 */
@Service
public class TbHouseInfoServiceImpl extends ServiceImpl<TbHouseInfoMapper, TbHouseInfo> implements ITbHouseInfoService {

    @Override
    public IPage<HouseInfoVO> houseInfoPage(HouseInfoVO houseInfoVO) {

        IPage<HouseInfoVO> page = new Page<>(houseInfoVO.getCurrent(), houseInfoVO.getSize());
        page = getBaseMapper().houseInfoPage(page, houseInfoVO);
        return page;
    }
}
